﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SDMX_ML.Framework.Compact
{
    public class CompactElement
    {
        private string _name;
        private List<CompactAttribute> _attributes;
        private List<CompactElement> _children;

        public CompactElement(string name)
        {
            if (!String.IsNullOrEmpty(name))
            {
                _name = name;
                _attributes = new List<CompactAttribute>();
                _children = new List<CompactElement>();
            }
            else
            {
                throw new Exception("Parameter name in CompactElement can't be null or empty!");
            }
        }

        public string Name
        {
            get { return _name; }
            private set { _name = value; }
        }

        public List<CompactAttribute> Attributes
        {
            get { return _attributes; }
            set { _attributes = value; }
        }

        public List<CompactElement> Children
        {
            get { return _children; }
            set { _children = value; }
        }
    }
}
